package com.lh.java.basic.datatype;

class Value {

	static int c = 0;

	Value() {

		c = 15;

	}

	Value(int i) {

		c = i;

	}

	static void inc() {

		c++;

	}

}

class Count {

	public static void prt(String s) {

		System.out.println("Count prt"+s);

	}

	Value v = new Value(10);

	static Value v1, v2;

	static {

		prt("11 v1.c=" + v1.c + " v2.c=" + v2.c);

		v1 = new Value(27);

		prt("22 v1.c=" + v1.c + " v2.c=" + v2.c);

		v2 = new Value(15);
	
		prt("33 v1.c=" + v1.c + " v2.c=" + v2.c);
	}
		public static void main(String[] args){
		Count ct = new Count();
		prt("44 ct.c=" + ct.v.c);
		prt("55 v1.c=" + v1.c + " v2.c=" + v2.c);
		v1.inc();
		prt("66 v1.c=" + v1.c + " v2.c=" + v2.c);
		prt("77 ct.c=" + ct.v.c);

	}
}
